/*jslint sloppy: true */
/*global require */
var LM = require('../global');
require('./create.html');

LM.controller('CreateProject', function ($scope, Project, $location) {
	$scope.project = {
		version: '0.0.0'
	};
	$scope.createProject = function () {
		var p = Project.create(null, $scope.project, function () {
			$location.url('/project/' + p.projectId);
		});
	};

	//inti
	$scope.queryConfig.clear().setActive();
	$scope.navConfig.setHref('#/project').setType('back');
});
